let base = config.ip
let projectName = '/rcdg-record'
let projectName1 = '/jx-backstage'
let projectName2 = '/topnet-assess'
import { get, post } from './http.js'

/************************* 公共 *************************/

// 多文件上传
export const uploadFiles = p => post(`${base}${projectName2}/sa-file-baseInfo/uploadFiles`, p)

// 登录
export const login = p => post(`${base}/jx-public-uias/login`, p)

/************************* 首页 *************************/

// 获取待办列表
export const listNeedDeals = p => post(`${base}${projectName}/record-need-deal/listNeedDeals`, p)

// 获取待办类型列表
export const getlistNeedDealTypes = p => post(`${base}${projectName}/record-need-deal/listNeedDealTypes`, p)

// 获取待办列表
export const listNeedDealsByParam = p => post(`${base}${projectName}/record-need-deal/listNeedDealsByParam`, p)

// 更新待办为已读
export const updateNeedDealRead = p => post(`${base}${projectName}/record-need-deal/updateNeedDealRead`, p)

// 获取消息列表
export const listNotices = p => post(`${base}${projectName}/notice/listNotices`, p)

// 更新消息为已读
export const updateNoticeRead = p => post(`${base}${projectName}/notice/updateNoticeRead`, p)

/************************* 工作通知 *************************/
// 获取工作通知列表
export const listWorks = p => get(`${base}${projectName1}/bulletion/selectAllBulletin`, p)
// 获取工作通知详情
export const getWorksDetail = p => get(`${base}${projectName1}/bulletion/getBulletionDetail`, p)
// 获取工作通知阅读记录
export const workSaveRead = p => post(`${base}${projectName1}/bulletion/saveRead`, p)

/************************* 消息 *************************/
// 消息类型数量获取
export const getSelectAllBulletinNumByType = p => get(`${base}${projectName1}/bulletion/selectAllBulletinNumByType`, p)
// 纪实及评价消息列表  01:纪实   03:评价
export const getListNoticesByType = p => post(`${base}${projectName2}/std-notice/listNoticesByType`, p)
// 更新全部未读为已读
export const updateAllNoticeRead = p => post(`${base}${projectName2}/std-notice/updateAllNoticeRead`, p)
